<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.7.3/vue.min.js"
    integrity="sha512-cH1Ej4JIqdLIap1BvDncAbRCkbl+63RW1hZqoeDjK1MfQtCHYXBkVgBoaHuvZjZRzMdtfjnsaRmzzucdmfL8zg=="
    crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <title>Document</title>
  <script src="../../font/iconfont.js"></script>

</head>
<!-- 通过这样的一个手法,来让我的代码变可以很react的方式一样,进行这样的操作 -->

<body>
  <div id="app">
    <template v-if="isFloder">
      <div v-for="item of arr">{{item}}</div>
    </template>
      <!-- <div v-for="item of arr" v-if='isFloder'>{{item}}</div> -->
  </div>
  <script>
   const app = new Vue({
      el: '#app',
      data() {
        return {
          arr: [1,2,3] 
        }
      },
      computed: {
        isFloder() {
          return this.arr && this.arr.length > 0 
        }
      },
    })
    console.log(app.$options.render)
  </script>
</body>

</html>